package com.iotechn.unimall.app.api.lease;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.LeaseCategoryDO;
import com.iotechn.unimall.data.domain.LeaseDO;
import com.iotechn.unimall.data.model.Page;

import java.util.List;

/**
 * 土地租赁
 *
 * @author hct
 * @email 77802226@qq.com
 * @date 2020-07-15 20:27:55
 */
@HttpOpenApi(group = "lease", description = "")
public interface LeaseService {

    @HttpMethod(description = "列表")
    Page<LeaseDO> list(
            @HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页长度", valueDef = "5") Integer limit,
            @HttpParam(name = "title", type = HttpParamType.COMMON, description = "搜索标题") String title,
            @HttpParam(name = "category", type = HttpParamType.COMMON, description = "搜索分类") String categoryId) throws ServiceException;

    @HttpMethod(description = "详情")
    LeaseDO detail(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "Id") Integer id) throws ServiceException;

    @HttpMethod(description = "分区列表")
    List<LeaseCategoryDO> categoryList() throws ServiceException;

}

